#ifndef TEST_GRAPHICS_TEST_BASIC_VERTEX_BUFFER_H
#	define TEST_GRAPHICS_TEST_BASIC_VERTEX_BUFFER_H

#include "rendertest.h"
#include "inputs/command.h"
#include "system/timer.h"

namespace test {
	namespace graffiti {

class BasicVertexBuffer
:	public dw::test::RenderTest
{
public : //! @name Types definitions
	//! @{
	typedef dw::test::RenderTest base;
	//! @}

public : //! @name Construction & Destruction
	//! @{
	BasicVertexBuffer()
	:	base("BasicVertexBuffer")
	,	m_wireframeMode(false)
	,	m_programXformColor(NULL)
	,	m_basisIndexBuffer(NULL)
	,	m_basisVertexBuffer(NULL)
	,	m_triCubeIndexBuffer(NULL)
	,	m_triCubeVertexBuffer(NULL)
	,	m_objectRot(0.0f)
	{
		;
	}

	virtual ~BasicVertexBuffer()
	{
		;
	}
	//! @}

public : //! @name Commands
	//! @{
	virtual bool setup(dw::graffiti::RenderWindow* renderWindow);
	virtual bool render();
	virtual bool teardown();
	//! @}

private : //! @name Internal commands
	//! @{
	bool initPrograms();
	bool initBasis();
	bool initTriCube();
	//! @}

private : //! @name Data
	//! @{
	dw::inputs::InputCommand m_wireframe;

	bool m_wireframeMode;

	dw::graffiti::Program* m_programXformColor;

	dw::graffiti::IndexBuffer* m_basisIndexBuffer;
	dw::graffiti::VertexBuffer* m_basisVertexBuffer;

	dw::graffiti::IndexBuffer* m_triCubeIndexBuffer;
	dw::graffiti::VertexBuffer* m_triCubeVertexBuffer;

	dw::float32 m_objectRot;

	dw::system::Timer m_timer;
	//! @}
};

	} // namespace graffiti
} // namespace test

#endif // !TEST_GRAPHICS_TEST_BASIC_VERTEX_BUFFER_H
